package project.android;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DbConnectionHelper extends SQLiteOpenHelper{
	
	
	public static String DATABASE_NAME = null;
	public static int DATABASE_VERSION = 1;
	public static String TABLE_NAME;
	public static String[] FIELDS;
	public static String fields;
		
	public DbConnectionHelper(Context context) {
		
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
		
	}

	@Override
	public void onCreate(SQLiteDatabase database) {
		
		Log.w("fields", fields);
		Log.w("fields", TABLE_NAME);
		database.execSQL("CREATE TABLE IF NOT EXISTS "+TABLE_NAME+ "("+ fields+");");
	
	}

	@Override
	public void onUpgrade(SQLiteDatabase database, int oldVersion,int newVersion) {
		
		database.execSQL("DROP TABLE IF EXISTS "+TABLE_NAME);
		onCreate(database);
		
	}

}
